<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>

<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<html:html>
<head>	
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/sampleForm.css" />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/me.css" />	
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/help/help.css" />
	<title>Pack</title>
 
	<script type='text/javascript' src='<%= request.getContextPath() %>/css/autocomplete/lib/jquery.js' ></script>
 
		
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/autocomplete/css/mainOLD.css" />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/autocomplete/css/jquery.autocomplete.css" />
	<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/autocomplete/css/thickbox.css" />
 
 	<link type="text/css" href="<%= request.getContextPath() %>/css/datepicker/css/ui.all.css" rel="stylesheet" /> 	
	<script type="text/javascript" src="<%= request.getContextPath() %>/css/datepicker/lib/jquery-ui-1.5.3.min.js"></script>
	<script type="text/javascript" src="<%= request.getContextPath() %>/stockRequest/jquery.validate.js" ></script>
 	<script type="text/javascript" src="<%= request.getContextPath() %>/stockRequest/jquery-1.4.2.min1.js" ></script>
  	<script type="text/javascript">
		$(document).ready(function(){
			$("#minDate").datepicker({ altField: 'input#minDate', altFormat: 'yy-mm-dd', minDate: new Date(2012,1 -1 ,1 ) });
			$("#form1").validate({
								
				submitHandler: function() {
					 
					//$('#dialog-confirm').dialog('open');
					form.submit();
				},
						
				rules: {					 
					minDate: "required" 						
				},
				messages: {
					minDate: "*" 	
				},

				// the errorPlacement has to take the table layout into account
				errorPlacement: function(error, element) {
					//alert("errorPlacement");			
					if ( element.is(":radio") ) {
						alert("radio");
						error.appendTo( element.parent().next().next() );
					}else if ( element.is(":checkbox") ) {
						alert("checkbox");
						error.appendTo ( element.next() );
					}else {
						 
						error.appendTo( element.parent().next() );
					}
				}		
			});
				 		 	
		});
		
		 		
	</script>

<style type="text/css">
#form1 label.error, #max_error {
	font-size: 1.5em;
	color: red;
}
</style>

</head>

<body><br />
<b id='docNew'></b>
<b id='docOld'></b>
<div id="wrapper">
	<!-- 
		<div id="header"><img src="images/kiuchilogo.png" width="305" height="80" /></div>
	 -->	 
	<div id="menu"><ul id="nav"></ul></div>

	<div id="content">
		<div id="menuNav"><a href='<%=request.getContextPath() %>/Login.do?mode=check'>หน้าหลัก</a> 
		 
			<br /><br />
	<div style="background: #ffffff;">
	<p align="center" id="titleIssueType">closed date</p>
	<html:form action="/stock.do" styleId="form1"  >	 
	       <input type="hidden" name="mode" value="updateClosedDate" />
	<div id="userPw01">
	<fieldset>
		<legend><b>closed date</b></legend><center>
 		   <table border="1" >
			<tr>
				<td > วันที่น้อยสุด ที่ให้บันทึกเบิก</td>
				<td>:</td>
				<td>
					<input type="text" name="minDate" value="${minDate}" id="minDate" >
				</td>
				<td >
					
				</td>				
			</tr>
			 				 			
 			 			 			 				 							
		</table></center>
		 <br />
     </fieldset><br /><br /></div>
 	
 	<table border="0" align="center" width="100%">
 		<tr>
 			<td align="center" ><html:submit property="mode" value="update" onclick="return confirm('ยืนยันการบันทึกข้อมูล?');"  /></td>
 			<td align="center" ><html:reset></html:reset> </td>
			<td align="center" >
</td> 			
 		</tr>
 	</table>    	    	    	
    </html:form>	
	</div>
	</div>
	</div> 
</body>

</html:html>